from sqlalchemy import Column, Integer, String, SmallInteger

from .base import BaseModel


class SpuAttributeValueDo(BaseModel):
    __tablename__ = "spu_attribute_value"
    __table_args__ = {"comment": "SPU属性值"}

    id = Column(Integer, primary_key=True, autoincrement=True, comment='主键ID')
    spu_id = Column(Integer, nullable=True, index=True, comment='商品ID')
    attr_id = Column(Integer, nullable=True, index=True, comment='属性ID')
    attr_name = Column(String(200), nullable=True, comment='属性名')
    attr_value = Column(String(200), nullable=True, comment='属性值')
    attr_sort = Column(Integer, nullable=True, comment='顺序')
    quick_show = Column(SmallInteger, nullable=True, comment='快速展示 0-否 1-是')